home *** CD-ROM | disk | FTP | other *** search
- From ames!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watmath!neumann.uwaterloo.ca!ssclift Mon Nov 9 10:23:51 PST 1992
- Article: 336 of comp.graphics.gnuplot
- Newsgroups: comp.graphics.gnuplot
- Path: ames!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watmath!neumann.uwaterloo.ca!ssclift
- From: ssclift@neumann.uwaterloo.ca (Simon Clift)
- Subject: Re: Running Gnuplot from FORTRAN, (and C)
- Message-ID: <BxGEIJ.MGF@math.uwaterloo.ca>
- Summary: Use popen.
- Sender: news@math.uwaterloo.ca (News Owner)
- Organization: University of Waterloo
- Date: Mon, 9 Nov 1992 14:49:31 GMT
- Lines: 262
-
- I've noticed a few people trying to run Gnuplot from a program. I looked
- at this problem a few weeks ago, when I wanted plotted output to display
- intermediate stage solutions from a fluid dynamics code. After consulting
- with local gurus, they pointed me to the Unix popen commands. I wrote this
- simple set of wrapper functions, meant to be linked to Sun 4/670 Fortran,
- and called as SUBROUTINE's. These will probably work with other Unix boxes.
-
- I compiled the source with
- gcc -c pipeLib.c
- which creates pipeLib.o. Then I just link this with my Fortran program
- f77 -O2 myFortranSource.o pipeLib.o -o myProgramExecutable
-
- What the library does is set up to 20 programs going (like gnuplot), then
- allows you to send to them as if the program were typing on the command
- line. I've included a brief set of docs after the source code, in latex
- format. There is no facility to watch the output of a program.
-
- Help yourself...
-
- ----------------------------Source Code, Cut here--------------------------
-